Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/440/changelog utility #441

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

northdpole
Copy link
Contributor

@northdpole northdpole commented Oct 22, 2024

close #440

sample output

[sg@sg changelog feature/440/changelog-utility*]$ go run main.go --repo-path `pwd` -patch -message="foobar" -current-tag='v0.56.4'
2024/11/01 17:49:33 INFO the latest annotated tag is tag=v0.56.4
2024/11/01 17:49:33 INFO working with commits=5
Tag 0.56.5 created at 7100c24555f665e58bb0ee86bbc3c5bf5de67209
## 0.56.5

**foobar**

2024-10-22T12:20:21+01:00: changelog binary that allows to generate a changelog consisting of commit messages between current HEAD and the last tag
2024-10-22T12:18:06+01:00: add changelog target to the makefile
2024-10-31T11:02:12Z: workaround defectdojo expecting a non-empty scanstarttime for their engagments
2024-10-30T14:57:59Z: fix #453 by providing an optional nvdApiKey to dependency-check
2024-10-31T11:02:12Z: workaround defectdojo expecting a non-empty scanstarttime for their engagments

@coveralls
Copy link

coveralls commented Oct 22, 2024

Pull Request Test Coverage Report for Build 11686575948

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 41.629%

Totals Coverage Status
Change from base Build 11684217196: 0.0%
Covered Lines: 3374
Relevant Lines: 8105

💛 - Coveralls

@northdpole northdpole force-pushed the feature/440/changelog-utility branch from c07571a to 7c2ea81 Compare October 22, 2024 18:53
@northdpole northdpole requested a review from andream16 October 22, 2024 19:39
@andream16
Copy link
Contributor

Can you post a sample output?

@northdpole
Copy link
Contributor Author

northdpole commented Oct 23, 2024

Can you post a sample output?

absolutely, here you go

$changelog --repo-path . --new-tag-name="v0.1.2.3" --new-tag-message="example changelog"

## v0.1.2.3
**example changelog**

* changelog binary that allows to generate a changelog consisting of commit messages between current HEAD and the last tag

* add changelog target to the makefile

* Update reviewdog references to smithy.

* Updating .gitignore to ignore smithy files previously ignored by ocurity.

* Updating actions to leverage smithy references.

* Updating tests to leverage smithy.

* Updating lock.

* Update README to replace ocurity with smithy.

* Updating protobuf contracts to use smithy as reference.

* Updating docs to use smithy references.

* Updating examples to leverage smithy.

@andream16
Copy link
Contributor

andream16 commented Oct 23, 2024

Can you post a sample output?

absolutely, here you go

$changelog --repo-path . --new-tag-name="v0.1.2.3" --new-tag-message="example changelog"

## v0.1.2.3
**example changelog**

* changelog binary that allows to generate a changelog consisting of commit messages between current HEAD and the last tag

* add changelog target to the makefile

* Update reviewdog references to smithy.

* Updating .gitignore to ignore smithy files previously ignored by ocurity.

* Updating actions to leverage smithy references.

* Updating tests to leverage smithy.

* Updating lock.

* Update README to replace ocurity with smithy.

* Updating protobuf contracts to use smithy as reference.

* Updating docs to use smithy references.

* Updating examples to leverage smithy.

I think this looks good but I'd like to not have blank lines between each commit report.

It would also be cool to add a short timestamp to each commit, which can be helpful for debugging potential individual issues!

@northdpole

@northdpole northdpole force-pushed the feature/440/changelog-utility branch from 7c2ea81 to 68dc562 Compare October 23, 2024 17:16
@ptzianos
Copy link
Contributor

As far as I understand the logic, the workflow is that the user runs the utility with the new tag that they want to add and the script generates a list of commit messages since the latest tag (latest being the latest one based on the timestamps)

What happens if we release a new major version (v1.0.0) but until it's rolled out everywhere we release a patch version of the previous major tag (previous latest version v0.66.0 and we release v0.66.1). This utility would produce list of commit messages for the new tag v1.0.1 from v0.66.1 to now instead of from v1.0.0, right? I would expect it to use the current tag passed as a flag to figure out that closest one, and the closest one would be found based on just simple string sorting.

Also, I would expect that we could pass flags to just create a new major/minor/patch version based on the latest tag because that's the most common use case and it would allow us to remove the relevant make targets

@northdpole northdpole force-pushed the feature/440/changelog-utility branch from 68dc562 to e8fac34 Compare November 1, 2024 15:48
@northdpole
Copy link
Contributor Author

Can you post a sample output?

absolutely, here you go
$changelog --repo-path . --new-tag-name="v0.1.2.3" --new-tag-message="example changelog"

## v0.1.2.3
**example changelog**

* changelog binary that allows to generate a changelog consisting of commit messages between current HEAD and the last tag

* add changelog target to the makefile

* Update reviewdog references to smithy.

* Updating .gitignore to ignore smithy files previously ignored by ocurity.

* Updating actions to leverage smithy references.

* Updating tests to leverage smithy.

* Updating lock.

* Update README to replace ocurity with smithy.

* Updating protobuf contracts to use smithy as reference.

* Updating docs to use smithy references.

* Updating examples to leverage smithy.

I think this looks good but I'd like to not have blank lines between each commit report.

It would also be cool to add a short timestamp to each commit, which can be helpful for debugging potential individual issues!

@northdpole

@andream16 , how about this?

## v0.1.2.3

**foobar**

2024-10-22T12:20:21+01:00: changelog binary that allows to generate a changelog consisting of commit messages between current 
HEAD and the last tag
2024-10-22T12:18:06+01:00: add changelog target to the makefile
2024-10-31T11:02:12Z: workaround defectdojo expecting a non-empty scanstarttime for their engagments

@northdpole northdpole force-pushed the feature/440/changelog-utility branch 2 times, most recently from c812907 to b5d028c Compare November 1, 2024 17:56
# This is the 1st commit message:

changelog binary that allows to generate a changelog consisting of commit messages between current HEAD and the last tag

# The commit message #2 will be skipped:

# fixup changelog
…mmit messages between current HEAD and the last tag
@northdpole northdpole force-pushed the feature/440/changelog-utility branch from b5d028c to 6827c97 Compare November 5, 2024 14:36
##

**v0.57.0**
2024-10-22T12:20:21+01:00: add changelog binary that allows to generate a changelog consisting of commit messages between defined tag and HEAD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please use just day-month-year format? I think that we don't need the hours, minutes and seconds personally :)

2024-10-22T12:20:21+01:00: add changelog binary that allows to generate a changelog consisting of commit messages between defined tag and HEAD
2024-10-22T12:18:06+01:00: add changelog target to the makefile
2024-10-16T11:33:41+01:00: remove results output from git-clone component
**v0.56.5**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add empty lines to separate the various releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create changelog utility
4 participants